# _*_ coding:utf-8 _*_
# @author : Joyamon
# @time : 2022-10-11 11:06
# @file : main.py
from youdao_translate import Youdao, search_youdao
from baidu_translate import Baidu, search_baidu


def main():
    print('有道翻译请选择 >> 1, 百度翻译请选择 >> 2')
    words = input('请选择翻译网站 :')
    if words == '1':
        while True:
            Youdao().translate_youdao(search_youdao())
    elif words == '2':
        while True:
            Baidu().translate_baidu(search_baidu())
    else:
        print('无此选项，请重新选择...')
        main()


if __name__ == '__main__':
    main()
